package com.nf.handler.columns;

import com.nf.MiniColumnHandler;

import java.sql.ResultSet;
import java.sql.SQLException;

public class MiniShortColumnHandler implements MiniColumnHandler {

    @Override
    public boolean metach(Class<?> propType) {
        return propType.equals(Short.class)||propType.equals(Short.TYPE);
    }

    @Override
    public Object apply(ResultSet rs, int pos) throws SQLException {
        return Short.valueOf(rs.getShort(pos));
    }
}
